import Vue from 'vue'
import ElTable from '@/components/element-ui/table'
import Pagination from '@/components/element-ui/pagination'
import MyDatePicker from '@/components/element-ui/date-picker'
import Upload from '@/components/element-ui/upload'
import { TableColumn, DatePicker, Loading, MessageBox, Message, Tree } from 'element-ui'
import '@/components/element-ui/style.scss'

Vue.use(Loading.directive)
Vue.use(TableColumn)
Vue.use(DatePicker)
Vue.use(Tree)

Vue.component(ElTable.name, ElTable)
Vue.component(Upload.name, Upload.default || Upload)
Vue.component(Pagination.name, Pagination.default || Pagination)
Vue.component(MyDatePicker.name, MyDatePicker.default || MyDatePicker)

Vue.prototype.$loading = Loading.service
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$message = Message;
